cmake_minimum_required(VERSION 3.10)
project(xthreadpool)

set(CXX_STANDARD 17)
set(CXX_STANDARD_REQUIRED on)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2")
endif()

find_package(spdlog REQUIRED)


add_library(xthread_pool_lib
    src/xthread_pool.cpp
    src/logger.cpp
)

target_link_libraries(thread_pool_lib 
    spdlog::spdlog
)

target_include_directories(include)